﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using GalaSoft.MvvmLight;
using GalaSoft.MvvmLight.Command;
using TotalSystems.Main.Infrastructure;
using GalaSoft.MvvmLight.Messaging;

namespace TotalSystems.Main.ViewModel
{
    public class MainPage_vm:ViewModelBase
    {
        private const string _navigatePage = "NavigatePage";
        #region Properties
        #endregion

        #region Commands

        public ICommand BaseDefinitionsCommand { get; set; }
        public ICommand DegreeImportantStuffCommand { get; set; }
        public ICommand RegimentationStuffCommand { get; set; }
        public ICommand StoreCommand { get; set; }
        public ICommand TypeStoreCommand { get; set; }
        public ICommand UnitStuffCommand { get; set; } 

        #endregion
        public MainPage_vm()
        {
            BaseDefinitionsCommand = new RelayCommand(OnBaseDefinitionsCommand);
            DegreeImportantStuffCommand = new RelayCommand(OnDegreeImportantStuffCommand);
            RegimentationStuffCommand = new RelayCommand(OnRegimentationStuffCommand);
            StoreCommand = new RelayCommand(OnStoreCommand);
            TypeStoreCommand = new RelayCommand(OnTypeStoreCommand);
            UnitStuffCommand = new RelayCommand(OnUnitStuffCommand);
        }

        #region Methods

        private void  OnBaseDefinitionsCommand()
        {
            Messenger.Default.Send<FormName>(FormName.Base, _navigatePage);
        }

        private void OnDegreeImportantStuffCommand()
        {
            Messenger.Default.Send<FormName>(FormName.DegreeImportantStuff, _navigatePage);
        }

        private void OnRegimentationStuffCommand()
        {
            Messenger.Default.Send<FormName>(FormName.RegimentationStuff, _navigatePage);
        }

        private void OnStoreCommand()
        {
            Messenger.Default.Send<FormName>(FormName.Store, _navigatePage);
        }

        private void OnTypeStoreCommand()
        {
            Messenger.Default.Send<FormName>(FormName.TypeStore, _navigatePage);
        }

        private void OnUnitStuffCommand()
        {
            Messenger.Default.Send<FormName>(FormName.UnitStuff, _navigatePage);
        }

        #endregion
    }
}
